﻿using CoreLibrary;
using CoreLibrary.Concurrent;
using Entities.DataBase;
using Entities.DataBase.Persistent;
using WebService.Security;

namespace WebService {

    public class Logs {

        public static void AddLog(string name, string desc, UserToken token) {
            TaskUtil.RunQuiet(() => Services.Locate<ILogService>().AddLog(new Log {
                Name        = name,
                Description = Util.GetString(desc),
                OperatorId  = token.UserId
            }));
        }

    }
}